package com.jy.entity;

import java.util.List;

public class PageInfo {
    private Integer currPage=1;
    private Integer pageSize=10;
    private Integer totalRow;//总行数
    private Integer totalPage;//总页数
    private Integer startRow=0; //开始行
    private List datas; //数据

    public Integer getStartRow() {
        return startRow;
    }

    public void setStartRow(Integer startRow) {
        this.startRow = startRow;
    }

    public List getDatas() {
        return datas;
    }

    public void setDatas(List datas) {
        this.datas = datas;
    }

    public Integer getCurrPage() {
        return currPage;
    }

    //当前页发生变化
    public void setCurrPage(Integer currPage) {
        this.currPage = currPage;
        startRow=(currPage-1)*pageSize;//重新计算开始行
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getTotalRow() {
        return totalRow;
    }

    public void setTotalRow(Integer totalRow) {
        this.totalRow = totalRow;
    }

    public Integer getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(Integer totalPage) {
        this.totalPage = totalPage;
    }

    @Override
    public String toString() {
        return "PageInfo{" +
                "currPage=" + currPage +
                ", pageSize=" + pageSize +
                ", totalRow=" + totalRow +
                ", totalPage=" + totalPage +
                ", startRow=" + startRow +
                ", datas=" + datas +
                '}';
    }
}
